import Vue from 'vue'
import Router from 'vue-router'
import Hello from '@/components/Hello'
import hotel from '@/components/hotel'
import car from '@/components/car'
import mine from '@/components/mine'
import detailInfo from '@/components/detailInfo'
//所以提醒我，以后一定要配对使用require和module.exports以及import和export default。http://www.mamicode.com/info-detail-1694072.html
// 也就是说，在webpack打包的时候，可以在js文件中混用require和export。但是不能混用import 以及module.exports。
import Lazyload from "vue-lazyload-img";
Vue.use(Lazyload, {
    time: 200,
    fade: true,
    nohori: false
  });
import FastClick from 'fastclick'; //点击延迟300ms处理
FastClick.attach(document.body);// init fastclick

Vue.use(Router);
import VueProgressBar from 'vue-progressbar'; // get vue-progressbar TODO
var options = {
  color: '#red',
  failedColor: '#red',
  thickness: '25px',
  transition: {
    speed: '0.2s',
    opacity: '0.6s'
  },
  autoRevert: true,
  location: 'top',
  inverse: false
};
Vue.use(VueProgressBar,options);

export default new Router({
  routes: [
    {path: '/', name: 'Hello', component: Hello},
    {path: '/hotel', name: 'hotel', component: hotel},
    {path: '/car', name: 'car', component: car},
    {path: '/mine', name: 'mine', component: mine},
    {path: '/detailInfo', name: 'detailInfo', component: detailInfo},
  ]
})
